package com.cssy.yd.logic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.byd.acegiext.domain.User;
import com.cssy.yd.logic.dao.LogicProGetApplyItemDAO;
import com.cssy.yd.logic.entity.LogicProGetApplyItemDO;
import com.cssy.yd.logic.service.ILogicProGetApplyItemService;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;
@Service("logicProGetApplyItemService")
public class LogicProGetApplyItemServiceImpl implements ILogicProGetApplyItemService {
	@Resource(name = "logicProGetApplyItemDAO")
	LogicProGetApplyItemDAO logicProGetApplyItemDAO ;
	@Override
	public SearchResult findListByExample(SearchConditions scs)
			throws SyBaseException {
		SearchResult rs = new SearchResult(scs);
		List<LogicProGetApplyItemDO> list = logicProGetApplyItemDAO.find(scs);
		rs.setResults(list);
		rs.setRecordCount(logicProGetApplyItemDAO.count(scs));// 添加分页计算 add by huang.xuming[2013-11-09]
		return rs;
	}

	@Override
	public Integer delete(String id, User user) throws SyBaseException {
		return logicProGetApplyItemDAO.deleteLogicProGetApplyItemDOByPrimaryKey(id);
	}

	
	@Override
	public Integer update(LogicProGetApplyItemDO t, User user)
			throws SyBaseException {
		return logicProGetApplyItemDAO.updateLogicProGetApplyItemDO(t);
	}

	@Override
	public LogicProGetApplyItemDO save(LogicProGetApplyItemDO t, User user)
			throws SyBaseException {
		logicProGetApplyItemDAO.insertLogicProGetApplyItemDO(t);
		return null;
	}

	@Override
	public LogicProGetApplyItemDO findListById(String id) throws SyBaseException {
		return logicProGetApplyItemDAO.findLogicProGetApplyItemDOByPrimaryKey(id);
	}

	@Override
	public Integer deleteBizRemoved(String id) throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}
}
